package me.jessyan.mvparms.demo.di.module.fragment;

import com.jess.arms.di.scope.FragmentScope;

import java.util.ArrayList;
import java.util.List;

import dagger.Module;
import dagger.Provides;

import me.jessyan.mvparms.demo.mvp.contract.fragment.BrandContract;
import me.jessyan.mvparms.demo.mvp.model.fragment.BrandModel;


@Module
public class BrandModule {
    private BrandContract.View view;

    /**
     * 构建BrandModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public BrandModule(BrandContract.View view) {
        this.view = view;
    }

    @FragmentScope
    @Provides
    BrandContract.View provideBrandView() {
        return this.view;
    }

    @FragmentScope
    @Provides
    BrandContract.Model provideBrandModel(BrandModel model) {
        return model;
    }

    @FragmentScope
    @Provides
    List<String> provideBrandTabList(){
        List<String> tabStrs = new ArrayList<>();
        tabStrs.add("-1F");
        tabStrs.add("1F");
        tabStrs.add("2F");
        tabStrs.add("3F");
        tabStrs.add("4F");
        tabStrs.add("5F");
        tabStrs.add("6F");
        return tabStrs;
    }
}